package com.qkl.xiatang.app.utils.appenum;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 料台料量状态: 0 无,1 少,2 多
 */
public enum FeedQtyStatusEnum {


    NOTHING(0,"料无"),
    LESS(1,"料少"),
    MANY(2,"料多"),
    ;

    private FeedQtyStatusEnum(Integer status,String name){
        this.status = status;
        this.name = name;
        EnumMap.map.put(status,this);
        EnumMap.list.add(status);
    }


    private Integer status;

    private String name;

    public static boolean isStatus(Integer status){
        return EnumMap.map.containsKey(status);
    }

    public static String statusName(Integer status){
        String result = "";
        FeedQtyStatusEnum statusEnum = EnumMap.map.get(status);
        if(null != statusEnum){
            result =  statusEnum.name;
        }
        return result;
    }

    private static  class EnumMap{
        public static Map<Integer,FeedQtyStatusEnum> map = new HashMap<>();
        public static List<Integer> list = new ArrayList<>();
    }

}
